﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Mangosoft.DiceCopy.Domain.MainBoundedContext.Aggregates.JobseekerAgg;

namespace Mangosoft.DiceCopy.Domain.MainBoundedContext.Aggregates.ResumeAgg {
    public static class ResumeFactory {
        public static Resume CreateResume(Jobseeker jobseeker,
            string name,
            string resumeNumber,
            string firstName,
            string lastName,
            Guid? avatarId,
            string phone,
            string mobile,
            int provinceCode,
            int cityCode,
            string address,
            string zip,
            string gender,
            DateTime? birthdate,
            int educationLevelCode,
            int? yearsExperienceCode,
            string qq,
            string blog,
            string sns1,
            string sns2,
            string sns3,
            string biography,
            string tags,
            int? industryCode,
            string desiredPosition,
            int? positionTypeCode,
            int? annualPayCode,
            string preferredLocations,
            int? willingToTravelCode,
            bool? willingToRelocate,
            bool? willingToTelecommute,
            int? canStartCode,
            bool? fromThirdParty,
            int? resumeType,
            int? privacyStatus,
            int? integrity
            ) {

            var resume = new Resume{
                Name = name,
                ResumeNumber = resumeNumber,
                FirstName = firstName,
                LastName = lastName,
                AvatarId = avatarId,
                Phone = phone,
                Mobile = mobile,
                ProvinceCode = provinceCode,
                CityCode = cityCode,
                Address = address,
                Zip = zip,
                Gender = gender,
                Birthdate = birthdate,
                EducationLevelCode = educationLevelCode,
                YearsExperienceCode = yearsExperienceCode,
                QQ = qq,
                Blog = blog,
                SNS1 = sns1,
                SNS2 = sns2,
                SNS3 = sns3,
                Biography = biography,
                Tags = tags,
                IndustryCode = industryCode,
                DesiredPosition = desiredPosition,
                PositionTypeCode = positionTypeCode,
                AnnualPayCode = annualPayCode,
                PreferredLocations = preferredLocations,
                WillingToTravelCode = willingToTravelCode,
                WillingToRelocate = willingToRelocate,
                WillingToTelecommute = willingToTelecommute,
                CanStartCode = canStartCode,
                FromThirdParty = fromThirdParty,
                ResumeType = resumeType,
                PrivacyStatus = privacyStatus,
                Integrity  = integrity ,
            };
                    

            resume.SetTheJobseekerForThisReume(jobseeker);

            resume.GenerateNewIdentity();

            return resume;
        }
    }
}
